package GUI;

import javax.swing.JButton;

import Joc.Joc;
import Joc.JocStates;

public class HillClimbingCommand extends JButton implements Command {

	private static final long serialVersionUID = 1L;

	public HillClimbingCommand() {
		super("Algoritm Hill Climbing");
	}
		
	public void execute() {
		SimulareDesenPanel.clearDesen();
		Joc j=Joc.getJocinstance();
		if (j.getState() == JocStates.PUZZLE) {
			SimulareDesenPanel.textdesen.append("Nimic!");
			MassagePanel.writeMessagePanel("Nimic!");
		}
		else if (j.getState() == JocStates.CANI) {
			MassagePanel.writeMessagePanel("NU poate fi aplicat algoritmul Hill Climbing!" );
		}
		else if (j.getState() == JocStates.LCV) {
			MassagePanel.writeMessagePanel("NU poate fi aplicat algoritmul Hill Climbing!" );
		}
		
	}

}
